package com.freecloud.spring.demo.action;

import com.freecloud.spring.demo.service.QueryService;
import com.freecloud.spring.formework.annotation.FCAutowired;
import com.freecloud.spring.formework.annotation.FCController;
import com.freecloud.spring.formework.annotation.FCRequestMapping;
import com.freecloud.spring.formework.annotation.FCRequestParam;
import com.freecloud.spring.formework.webmvc.servlet.FCModleAndView;

import java.util.HashMap;
import java.util.Map;

/**
 * @Author: maomao
 * @Date: 2019-12-11 11:22
 */
@FCController
@FCRequestMapping("/web")
public class MyAction {

    @FCAutowired
    private QueryService queryService;


    @FCRequestMapping("/testAction")
    public String testAction(){

        return "";
    }

    @FCRequestMapping("/testModel")
    public FCModleAndView testModel(){
        return null;
    }

    @FCRequestMapping("/error")
    public FCModleAndView error(){
        Map<String,Object> model = new HashMap<>();
        model.put("detail","detail!!!!!");
        model.put("stackTrace","stackTrace!!!!!");
        return new FCModleAndView("500",model);
    }
}
